package com.kly.cashmall.services.api;

import com.kly.cashmall.bean.AdvanceLivenessDetectionBean;
import com.kly.cashmall.bean.BankDetailBean;
import com.kly.cashmall.bean.BaseEntity;
import com.kly.cashmall.bean.ExtensionDetailBean;
import com.kly.cashmall.bean.IndexProductListBean;
import com.kly.cashmall.bean.LivenessDetectionBean;
import com.kly.cashmall.bean.LoanDetailBean;
import com.kly.cashmall.bean.LoanListBean;
import com.kly.cashmall.bean.ProductSubmitFilterBean;
import com.kly.cashmall.bean.LoginBean;
import com.kly.cashmall.bean.IndexBean;
import com.kly.cashmall.bean.MessageBean;
import com.kly.cashmall.bean.MineInfoBean;
import com.kly.cashmall.bean.OrderConfirmBean;
import com.kly.cashmall.bean.ProductCategoryBean;
import com.kly.cashmall.bean.ProductDetailsConfirmBean;
import com.kly.cashmall.bean.ProfileActionBean;
import com.kly.cashmall.bean.ProfileInfoBean;
import com.kly.cashmall.bean.ProfileJumpBean;
import com.kly.cashmall.bean.ProtocolBean;
import com.kly.cashmall.bean.QueryPayResultBean;
import com.kly.cashmall.bean.RazorpayInfoBean;
import com.kly.cashmall.bean.RepayDetailsBean;
import com.kly.cashmall.bean.UpdateBean;
import com.kly.cashmall.bean.UserProfileListBean;
import com.kly.cashmall.module.home.home_tab.tab_view.HomeMainMenuAction;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.POST;

public interface Api {

    /**
     * 获取协议
     *
     * @return
     */
    @POST("/config/protocol/get")
    Observable<ProtocolBean> getProtocol();

    /**
     * 获取版本信息
     *
     * @return
     */
    @POST("/config/appcode/get")
    Observable<UpdateBean> getConfigAppCode();

    /**
     * 获取底部导航栏
     *
     * @return
     */
    @POST("/product/bottom/menu/list")
    Observable<List<HomeMainMenuAction>> getMenuList();

    /**
     * 获取OPT
     *
     * @return
     */
    @POST("/verifycode/send")
    Observable<BaseEntity> getVerifycodeSend(@Body RequestBody body);

    /**
     * 登录
     *
     * @return
     */
    @POST("/user/login/verifycode")
    Observable<LoginBean> getLoginVerifycode(@Body RequestBody body);

    /**
     * 首页
     *
     * @return
     */
    @POST("/product/home")
    Observable<IndexBean> getProductHome();

    /**
     * 我的
     *
     * @return
     */
    @POST("/user/info/get")
    Observable<MineInfoBean> getUserInfo();


    /**
     * 上传头像
     *
     * @return
     */
    @POST("/user/avatar/save")
    Observable<BaseEntity> getUploadAvatar(@Body RequestBody body);

    /**
     * 消息列表
     *
     * @return
     */
    @POST("/message/list/get")
    Observable<MessageBean> getMessageList(@Body RequestBody body);

    /**
     * 订单详情
     *
     * @return
     */
    @POST("/order/detail")
    Observable<LoanDetailBean> getOrderDetail(@Body RequestBody body);

    /**
     * 订单列表
     *
     * @return
     */
    @POST("/order/list")
    Observable<LoanListBean> getOrderList(@Body RequestBody body);

    /**
     * 支付详情
     *
     * @return
     */
    @POST("/order/repay/post")
    Observable<RazorpayInfoBean> getOrderRepay(@Body RequestBody body);

    /**
     * 支付详情
     *
     * @return
     */
    @POST("/order/extension/detail")
    Observable<ExtensionDetailBean> getExtensionDetail(@Body RequestBody body);

    /**
     * 订单提现
     *
     * @return
     */
    @POST("/order/withdraw/post")
    Observable<BaseEntity> getOrderWithdraw(@Body RequestBody body);
    /**
     * 订单提现
     *
     * @return
     */
    @POST("/action/list")
    Observable<ProfileActionBean> getProfileActionList(@Body RequestBody body);

    /**
     * 上传数美信息
     *
     * @return
     */
    @POST("/user/profile/fingerprint/post")
    Observable<BaseEntity> getFingerprint(@Body RequestBody body);

    /**
     * 上传通讯录
     *
     * @return
     */
    @POST("/user/profile/contact/post")
    Observable<BaseEntity> getContact(@Body RequestBody body);

    /**
     * 获取填写资料
     *
     * @return
     */
    @POST("/user/profile/get")
    Observable<ProfileInfoBean> getUserProfile(@Body RequestBody body);

    /**
     * 保存填写资料
     *
     * @return
     */
    @POST("/user/profile/save")
    Observable<ProfileJumpBean> getUserProfileSave(@Body RequestBody body);

    /**
     * 获取银行名称
     *
     * @return
     */
    @POST("/user/profile/ifsc")
    Observable<BankDetailBean> getProfileIfsc(@Body RequestBody body);

    /**
     * 获取license
     *
     * @return
     */
    @POST("/face/advance/liveness/license")
    Observable<LivenessDetectionBean> getFaceAdvanceLivenessLicense(@Body RequestBody body);

    /**
     * 上传liveness凭证
     *
     * @return
     */
    @POST("/face/advance/liveness/detection")
    Observable<AdvanceLivenessDetectionBean> getAdvanceLivenessDetection(@Body RequestBody body);

    /**
     * 查询支付状态
     *
     * @return
     */
    @POST("/order/repay/query")
    Observable<QueryPayResultBean> getQueryRepay(@Body RequestBody body);

    /**
     * 产品详情
     *
     * @return
     */
    @POST("/product/detail")
    Observable<ProductCategoryBean> getProductDetail(@Body RequestBody body);

    /**
     * 产品详情下的个人资料
     *
     * @return
     */
    @POST("/action/list")
    Observable<UserProfileListBean> getUserProfileActionList(@Body RequestBody body);

    /**
     * 提交订单
     *
     * @return
     */
    @POST("/order/submit/filter")
    Observable<ProductSubmitFilterBean> getOrderSubmitFilter(@Body RequestBody body);

    /**
     * 确认订单
     *
     * @return
     */
    @POST("/order/submit/post")
    Observable<OrderConfirmBean> postOrderSubmit(@Body RequestBody body);

    /**
     * 获取订单信息
     *
     * @return
     */
    @POST("/order/submit/get")
    Observable<ProductDetailsConfirmBean> getOrderSubmit(@Body RequestBody body);
    /**
     * 产品列表
     *
     * @return
     */
    @POST("/product/list")
    Observable<IndexProductListBean> getProductList(@Body RequestBody body);

    /**
     * 还款详情
     *
     * @return
     */
    @POST("/order/repay/detail")
    Observable<RepayDetailsBean> getOrderRepayDetail(@Body RequestBody body);


    /**
     * 获取oss
     *
     * @return
     */
    @POST("/picture/oss/token/get")
    Observable<RepayDetailsBean> getOssToken(@Body RequestBody body);

    /**
     * 首页产品点击数量
     *
     * @return
     */
    @POST("/product/home/product/click")
    Observable<BaseEntity> getHomeProductClick(@Body RequestBody body);

}
